<?php TPL::output('admin/global/header.tpl.htm'); ?>
<!--left-->
<?php TPL::output('admin/global/left.tpl.htm'); ?>
<!--left-->

<div id="main-content" style="margin:0 0 0 200px;">
	<div class="clear"></div>
	<div class="content-box">
		<div class="content-box-header">
			<h3> 邮件设置 </h3>
			<ul class="content-box-tabs">
			</ul>
			<div class="clear"></div>
		</div>
		<div class="content-box-content">
			<div id="notification_box" class="notification success png_bg" style="display:none;"> <a class="close" href="javascript:;"></a>
				<div name="notification_content"></div>
			</div>
			<div class="tab-content default-tab" id="tab1">
				<form id="_save_form" action="admin/setting/sys_save_ajax/" method="post">
					<fieldset>
					<p groupid="7" name="email_type">
						<label>系统邮件发送方式：</label>
						<select class="small-input" name="email_type" style="width:500px;">
							<option value="1" <?php if ($this->setting['email_type'] == '1'){ ?> selected="true"<?php } ?>>通过 SOCKET 连接 SMTP 服务器发送</option>
							<option value="2" <?php if ($this->setting['email_type'] == '2'){ ?> selected="true"<?php } ?>>通过 PHP 函数的 sendmail 发送</option>
						</select>
					</p>
					<p>
						<label>接收测试邮箱地址</label>
						<input name="test_email" class="text-input small-input" type="text" value=""/>
						&nbsp;
						<input class="button" type="button" onclick="test_email_setting($('#_save_form'), $(this));" value="  发送测试邮件  " />
					</p>
					<p groupid="7" name="smtp_server">
						<label>SMTP 服务器：<span style="font-weight:normal">(例如: smtp.163.com)</span></label>
						<input name="smtp_server" class="text-input small-input" type="text" value="<?php echo $this->setting['smtp_server']; ?>"/>
					</p>
					<p groupid="7" name="smtp_ssl">
						<label>使用安全链接(SSL)连接服务器：<span style="font-weight:normal">(请根据服务商要求选择)</span></label>
						<input type="radio" name="smtp_ssl" value="Y" <?php if ($this->setting['smtp_ssl'] == 'Y'){ ?> checked="true"<?php } ?>/>
						是
						<input type="radio" name="smtp_ssl" value="N" <?php if ($this->setting['smtp_ssl'] == 'N'){ ?> checked="true"<?php } ?>/>
						否 </p>
					<p groupid="7" name="smtp_port">
						<label>SMTP 端口：<span style="font-weight:normal">(留空时默认服务器端口为 25，使用 SSL 协议默认端口为 465，详细参数请询问邮箱服务商)</span></label>
						<input name="smtp_port" class="text-input small-int" type="text" value="<?php echo $this->setting['smtp_port']; ?>"/>
					</p>
					<p groupid="7" name="smtp_username">
						<label>SMTP 帐户：</label>
						<input name="smtp_username" class="text-input small-input" type="text" value="<?php echo $this->setting['smtp_username']; ?>"/>
					</p>
					<p groupid="7" name="smtp_password">
						<label>SMTP 密码：</label>
						<input name="smtp_password" class="text-input small-input" type="text" value="<?php echo $this->setting['smtp_password']; ?>"/>
					</p>
					<p>
						<label>系统邮件来源邮箱地址：</label>
						<input name="from_email" class="text-input small-input" type="text" value="<?php echo $this->setting['from_email']; ?>"/>
					</p>
					<p>
						<input class="button" type="button" onclick="ajax_post($('#_save_form'), _form_process);" value="  保  存  " />
					</p>
					</fieldset>
					<div class="clear"></div>
				</form>
			</div>
		</div>
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="关闭" /></a>
			<div id="notf_cont"></div>
		</div>
	</div>
	<!-- footer -->
	<?php TPL::output('admin/global/footer.tpl.htm'); ?>
	<!-- footer -->
</div>
<!-- main -->
</div>
</body></html>